<%-- 
    Document   : usuario
    Created on : 09/08/2010, 14:31:30
    Author     : atila
--%>
<%@page import="org.madmac.servlet.action.Action"%>
<%@include file="/common_pages/taglib.jsp" %>
<%@page import="org.madmac.servlet.form.Form"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<!-- VERIFICA SE O USUÁRIO ESTÁ COM O COOKIE VÁLIDO, SENÃO O REDIRECIONA PARA A PÁGINA DE LOGIN -->
<%@ include file="/log/verify_login.jsp" %>
<!-- VERIFICA SE O USUÁRIO TEM PERMISSÃO DE ACESSAR A PÁGINA, SENÃO REDIRECIONA PARA A PÁGINA INICIAL -->
<%@include file="/log/adm_page.jsp" %>

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Usuários :: MAD MAC 1.0.1</title>
      <link rel="icon" href="/madmac/favicon.ico" type="image/x-icon" />
      <link rel="shortcut icon" href="/madmac/favicon.ico" type="image/x-icon" />
      <link rel="stylesheet" href="/madmac/menu_madmac_files/cbcscbmenu_madmac.css" type="text/css" />
      <link rel="stylesheet" href="/madmac/estilos/madmac_tables.css" type="text/css" />
		<link rel="stylesheet" href="/madmac/estilos/madmac_inputs.css" type="text/css" />
      <link rel="stylesheet" href="/madmac/estilos/madmac_divs.css" type="text/css" />
      <link rel="stylesheet" href="/madmac/estilos/madmac_others.css" type="text/css" />
      <script type="text/javascript" src="/madmac/madmacproject.js"></script>
      <script type="text/javascript" language="javascript" src="/madmac/paginacao/js/jquery.js"></script>
   </head>
   <body>
      <div class="logotype"><img src="/madmac/madmac-logo-1.0.1.png" height="120%" alt="MAD MAC"></div>

      <div class="menu_principal">
         <%@include file="/common_pages/menu.jsp" %>
      </div>

      <div class="search_mac">
         <%@include file="/common_pages/search_mac.jsp" %>
      </div>

      <div class="corpo">
         <%
         if (request.getAttribute("action") != null) {
            if (Action.LIST.equals(request.getAttribute("action"))) {
            %>
               <c:import url="/usuario/usuarioList.jsp"></c:import>
            <%
            } else if (Action.ERROR.equals(request.getAttribute("action"))) {
              // TODO: por trecho de erro em arquivo.
              %>
                 <c:import url="/common_pages/erro.jsp"></c:import>
              <%
            }
         } else if (request.getParameter("form") != null) {
            if (Form.ADD.equals(Form.valueOf(request.getParameter("form")))) {
            %>
            <c:import url="${param.url}"></c:import>
            <%
            }
         }
         %>
      </div>

      <div class="footer_madmac">
         <%@include file="/common_pages/footer.jsp" %>
      </div>
   </body>
</html>